#tag Class
Protected Class ArrayTests
Inherits RBUnit.TestFixture
	#tag Method, Flags = &h0
		Sub ArrayCopyTest()
		  dim values() as Variant  ' array of variants as convenient way to get array of arrays
		  for i as integer = 0 to 5
		    dim trecs() as string
		    trecs.Append "blah"
		    values.append trecs
		  next
		  Assert.AreEqual 5, values.Ubound
		  Assert.AreDifferent values(0), values(1), "arrays stored in different cells are physically different objects"
		  
		  ' need to use variables to pull arrays out of Variant, no equivalent to StringValue
		  dim a1(), a2() as string
		  a1 = values(0)
		  a2 = values(1)
		  Assert.AreEqual a1(0), a2(0), "arrays stored in different cells have same content, so values are equal"
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub ArrayEqualityTest()
		  dim a1() as string = Array("an array")
		  dim a2() as string
		  
		  a2 = a1
		  Assert.IsTrue a1=a2, "are two variables pointing to same string array equal?"
		  
		  a1 = Array("hello")
		  a2 = Array("hello")
		  Assert.IsTrue a1<>a2, "two  different array objects, same contents are NOT equal"
		  
		End Sub
	#tag EndMethod


	#tag ViewBehavior
		#tag ViewProperty
			Name="Name"
			Visible=true
			Group="ID"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Index"
			Visible=true
			Group="ID"
			InitialValue="-2147483648"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Super"
			Visible=true
			Group="ID"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Left"
			Visible=true
			Group="Position"
			InitialValue="0"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Top"
			Visible=true
			Group="Position"
			InitialValue="0"
			InheritedFrom="Object"
		#tag EndViewProperty
	#tag EndViewBehavior
End Class
#tag EndClass
